{ "cells": [ { "cell_type": "markdown", "source": [ "# Problem definition\n", "Din Djarin is a retired bounty hunter that now runs a small factory specialised in making classic weapons in a colony recently restablished in Mandalore. The factory manufactures two different types of weapons, swords and spears. Din uses special alloys, mixtures of metals and rare materials, which have made a name for the endurance of his weapons across the colony. The table below shows the weight in pounds of each material needed to make each type of weapon:\n", "\n", "| Metal | spear | sword |\n", "|----------|-------|-------|\n", "| Beskar | 1 | 0.5 |\n", "| Tungsten | 1 | 1 |\n", "| Titanium | 3 | 1 |\n", "\n", "And the table below shows the total amount of each metal available, also in pounds: \n", "\n", "| Metal | Amount |\n", "|----------|--------|\n", "| Beskar | 125 |\n", "| Tungsten | 225 |\n", "| Titanium | 300 |\n", "\n", "The price of a spear is 40 credits and the price of a sword is 5 credits. Din has already sold 100 swords, so he needs to manufacture at least that many.\n", "\n", "**Write a CLP problem to find the optimal number of spades and swords that maximise revenues**" ], "metadata": { "collapsed": false } } ], "metadata": { "colab": { "name": "CLP assignment.ipynb", "provenance": [] }, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" }, "pycharm": { "stem_cell": { "cell_type": "raw", "source": [], "metadata": { "collapsed": false } } } }, "nbformat": 4, "nbformat_minor": 1 }